/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
*/
package cluster

import (
	"github.com/rs/zerolog/log"
	"github.com/spf13/cobra"
	"satellite/app/cluster"
)

// restartCmd represents the restartCmd command
var restartCmd = &cobra.Command{
	Use:   "restart",
	Short: "重启集群",
	Long:  ``,
	Args:  Args,
	Run: func(cmd *cobra.Command, args []string) {
		runner := cluster.NewRestart(restartOption).WithBase(base)
		err := runner.Run()
		if err != nil {
			log.Warn().Err(err).Send()
			return
		}
	},
}

var (
	restartOption = new(cluster.RestartOption)
)

func init() {
	clusterCmd.AddCommand(restartCmd)
}
